<template>
    <el-dialog width="30%" title="更改预约时间" :show-close="false" :visible="showUpdateForm">
        <el-date-picker :clearable="false" @change="change" v-model="value" type="datetime" placeholder="请选择预约日期" default-time="16:00:00" format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm" />
        <template #footer class="dialog-footer">
            <el-button @click="hideUpdateForm">取消</el-button>
            <el-button type="primary" @click="doUpdate">确定</el-button>
        </template>
    </el-dialog>
</template>
<script>
export default {
    name: 'UpdateOrder',
    data() {
        return {
            value: ''
        };
    },
    props: {
        showUpdateForm: {
            default: false
        },
        change: {
            type: Function
        },
        doUpdate: {
            type: Function
        },
        orderTime: {
            default: ''
        },
        hideUpdateForm: {
            type: Function
        }
    },
    watch: {
        orderTime(value) {
            this.value = value;
        }
    }
};
</script>
